package AOP;

public class CaLcImpl implements Calc1{
    @Override
    public int add(int i, int j) {
        //验证.... 非核心业务代码
        //日志... 非核心业务代码
        System.out.println("==>add()正在执行,参数:i:"+i+",j:"+j);
        MyLogging.methodBefore("add()",i,j);
        int result = i+j;
        System.out.println("==>add()执行完毕,结果为rs:"+result);
        MyLogging.methodAfter("add()",result);
        return result;
    }

    @Override
    public int sub(int i, int j) {
        System.out.println("==>sub()正在执行,参数:i:"+i+",j:"+j);
        int result = i-j;
        System.out.println("==>sub()执行完毕,结果为rs:"+result);

        return result;
    }

    @Override
    public int mul(int i, int j) {

        int result = i*j;


        return result;
    }

    @Override
    public int div(int i, int j) {

        int result = i/j;

        return result;
    }
}
